package wechat.rcv.data;

import java.util.Date;

public class WeResponseBuilder {
	public static String createTxtMsg(String ToUserName, String FromUserName, String content) {
		String format = "<xml>\n" + "<ToUserName><![CDATA[%1$s]]></ToUserName>\n"
				+ "<FromUserName><![CDATA[%2$s]]></FromUserName>\n" + "<CreateTime>%3$s</CreateTime>\n"
				+ "<MsgType><![CDATA[%4$s]]></MsgType>\n" + "<Content><![CDATA[%5$s]]></Content>\n" + "</xml>";

		String createTime = Long.toString(new Date().getTime());
		return String.format(format, ToUserName, FromUserName, createTime, "text", content);
	}
}
